const Mock = require('mockjs')

const data = Mock.mock({
  'items|5': [{
    // id: '@increment',
    num: '@integer(20201314001, 20201314099)', 'Account|1': ['test'],
    'state|1': ['已关闭',
      '待发货',
      '已发货'
    ],
    'imgUrl|1': ['https://gd2.alicdn.com/imgextra/i2/87627188/TB274D2of6H8KJjy0FjXXaXepXa_!!87627188.jpg_400x400.jpg',
'https://gw.alicdn.com/bao/uploaded/i4/11799105/O1CN01h1UnzQ2H88wY6qaHC_!!0-item_pic.jpg_240x240q50s150.jpg_.webp',
'https://img.alicdn.com/imgextra/i3/3410018448/O1CN01QvBCGp2CHEhzyD2fI_!!3410018448.jpg_430x430q90.jpg',
'https://img.alicdn.com/imgextra/i1/1808940384/O1CN01ytz97H1EhuqxXiaEJ_!!1808940384.jpg_430x430q90.jpg',
'https://img.alicdn.com/imgextra/i4/2549841410/O1CN01le329U1MHpDMgTy27_!!2549841410-0-sm.jpg_430x430q90.jpg',
'https://gd4.alicdn.com/imgextra/i1/2253007734/O1CN01cwIN9V270DtlCag7f_!!2253007734.jpg_400x400.jpg'

],
    graduate_time: '@datetime',
    price: '￥@integer(1000, 1500)',
    'pay|1': ['未支付', '微信', '支付宝'],
    source: 'App订单',

    // number: '@integer(1, 10)',
    numberOrder: 'R@integer(20011024,20011050)'
  }]
})

module.exports = [{
  url: '/vue-admin-template/orders/list',
  type: 'get',
  response: () => {
    const items = data.items
    return {
      code: 20000,
      data: {
        total: items.length,
        items: items
      }
    }
  }
}]
